<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
</head>
<body>
<h3>登录</h3>
<form class="login-form" method="post" action="/login/form" novalidate>
    <table>
        <tr>
            <td>用户名:</td>
            <td><input type="text" name="username"></td>
        </tr>
        <tr>
            <td>密码:</td>
            <td><input type="password" name="password"></td>
        </tr>
        <tr>
            <td>图形验证码:</td>
            <td>
                <input type="text" name="imageCode">
                <img src="/validate/image?width=80&height=40">
            </td>
        </tr>
        <tr>
            <td>记住我:</td>
            <td>
                <input type="checkbox" name="remember-me" checked>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <button type="submit">登录</button>
            </td>
        </tr>
    </table>
</form>

短信登录
<form action="/login/mobile" method="post">
    <table>
        <tr>
            <td>手机号:</td>
            <td><input type="text" name="mobile" value="18035198120"></td>
        </tr>
        <tr>
            <td>验证码:</td>
            <td><input type="text" name="smsCode"></td>
            <td><a href="javascript:void(0);" onclick="validateSms()">生成验证码</a></td>
        </tr>
        <tr>
            <td colspan="2">
                <button type="submit">登录</button>
            </td>
        </tr>
    </table>
</form>
</body>
<script>
    function validateSms() {
        var xhr = new XMLHttpRequest();
        xhr.open('GET', '/validate/sms?mobile=18035198120', true);
        xhr.send();
    }
</script>
</html>